/*
 * @Description:
 * @Author: Zzt
 * @Date: 2022-11-14 09:42:31
 * @LastEditTime: 2023-03-01 20:41:57
 */
import { lazy } from 'react';
import Layout from '@/layout';
import lazyLoad from '../components/lazyLoad';

export const GlobalRecycleBin = lazy(
  () => import(/* webpackChunkName: "GlobalPage" */ '@/view/globalPage/RecycleBin/RecycleBinMain')
);

export const GlobalFuncNav = lazy(
  () => import(/* webpackChunkName: "System" */ '@/view/sysMaintenance/FuncAndNav/FuncAndNavMain')
);

// 角色管理
export const GlobalRole = lazy(
  () => import(/* webpackChunkName: "UserRight" */ '@/view/userRight/Role/RoleMain')
);

// 公告管理
export const GlobalAnnouncement = lazy(
  () =>
    import(
      /* webpackChunkName: "UserRight" */ '@/view/globalPage/AnnouncementMgt/AnnouncementMgtMain'
    )
);
// 公告查看
export const GlobalAnnounce = lazy(
  () =>
    import(/* webpackChunkName: "UserRight" */ '@/view/globalPage/Announcement/AnnouncementMain')
);

// 收藏
export const GlobalFavourite = lazy(
  () => import(/* webpackChunkName: "UserRight" */ '@/view/globalPage/Favourite/FavouriteMain')
);
/* 档案篮 */
export const GlobalBasket = lazy(
  () =>
    import(/* webpackChunkName: "UserRight" */ '@/view/globalPage/ArchiveBasket/ArchiveBasketMain')
);
const GlobalPageRoutes: any[] = [
  {
    path: '/',
    element: <Layout />,
    hidden: true,
    children: [
      {
        path: 'recycle',
        element: lazyLoad(GlobalRecycleBin),
        meta: {
          title: '回收站'
        }
      },
      {
        path: 'navi-config',
        element: lazyLoad(GlobalFuncNav),
        meta: {
          title: '功能权限配置'
        }
      },
      {
        path: 'role-mgt',
        element: lazyLoad(GlobalRole),
        meta: {
          title: '角色管理'
        }
      },
      {
        path: 'announcement-mgt',
        element: lazyLoad(GlobalAnnouncement),
        meta: {
          title: '公告管理'
        }
      },
      {
        path: 'announcement',
        element: lazyLoad(GlobalAnnounce),
        meta: {
          title: '公告查看'
        }
      },
      {
        path: 'favourite',
        element: lazyLoad(GlobalFavourite),
        meta: {
          title: '收藏'
        }
      },
      {
        path: 'basket',
        element: lazyLoad(GlobalBasket),
        meta: {
          title: '档案篮'
        }
      }
    ]
  }
];

export default GlobalPageRoutes;
